:root {
  --primary: #2c3e50;
  --success: #27ae60;
  --danger: #d9534f;
  --bg-light: #f8f9fa;
}

.container {
  font-family: 'Segoe UI', system-ui, sans-serif;
  max-width: 950px;
  margin: 2rem auto;
}

fieldset {
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 25px;
  background: white;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

legend {
  font-weight: 800;
  color: var(--primary);
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
}

/* Row Layout */
.form-row {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.form-group {
  display: flex;
  gap: 10px;
}

label {
  font-weight: 600;
  margin-bottom: 5px;
  color: #555;
}

/* Inputs */
input[type="text"] {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  transition: border 0.2s;
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--success);
}

.read-only {
  background-color: var(--bg-light);
  border-style: dashed;
  color: #333;
}

.result-field {
  color: var(--danger) !important;
  font-weight: bold;
  font-size: 1.2rem;
  border: 2px solid var(--danger);
}

/* Buttons */
.btn {
  flex: 1;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.2s;
}

.btn-calc { background: var(--success); color: white; }
.btn-clear { background: #95a5a6; color: white; }
.btn:hover { opacity: 0.9; }

/* Text variations */
.instruction-text {
  font-size: 0.9rem;
  color: #666;
  line-height: 1.4;
}

.note {
  font-size: 0.8rem;
  color: #888;
  border-top: 1px solid #eee;
  padding-top: 15px;
  margin-top: 10px;
}

hr { border: 0; border-top: 1px solid #eee; margin: 20px 0; }

